<template>
  <div class="app">
    <div class="base-chart-box">我是来捣乱的盒子</div>
    <BaseChart ref="basechart"></BaseChart>
    <button @click="fn">获取图表组件</button>
  </div>
</template>

<script>
import BaseChart from "./components/BaseChart.vue";
export default {
  components: {
    BaseChart,
  },
  methods: {
    fn() {
      // console.log(this.$refs.basechart);
      // console.log(this.$refs.basechart.msg);
      this.$refs.basechart.alertFn();
    },
  },
};
</script>

<style>
.base-chart-box {
  width: 300px;
  height: 200px;
}
</style>